/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package py.com.peluq.model.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Diego_M
 */
@Embeddable
public class NotaRemiDetPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "re_cod", nullable = false)
    private int reCod;
    @Basic(optional = false)
    @NotNull
    @Column(name = "prod_cod", nullable = false)
    private int prodCod;

    public NotaRemiDetPK() {
    }

    public NotaRemiDetPK(int reCod, int prodCod) {
        this.reCod = reCod;
        this.prodCod = prodCod;
    }

    public int getReCod() {
        return reCod;
    }

    public void setReCod(int reCod) {
        this.reCod = reCod;
    }

    public int getProdCod() {
        return prodCod;
    }

    public void setProdCod(int prodCod) {
        this.prodCod = prodCod;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) reCod;
        hash += (int) prodCod;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NotaRemiDetPK)) {
            return false;
        }
        NotaRemiDetPK other = (NotaRemiDetPK) object;
        if (this.reCod != other.reCod) {
            return false;
        }
        if (this.prodCod != other.prodCod) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "py.com.peluq.model.entity.NotaRemiDetPK[ reCod=" + reCod + ", prodCod=" + prodCod + " ]";
    }
    
}
